//
//  cotrolCentercostomButton.m
//  Recycling
//
//  Created by jzd on 2018/6/1.
//  Copyright © 2018年 宋佳. All rights reserved.
//

#import "cotrolCentercostomButton.h"

@implementation cotrolCentercostomButton

-(void)awakeFromNib{
    [super awakeFromNib];
    
    self.layer.cornerRadius = 5.0;
    self.layer.masksToBounds = YES;
    self.layer.borderColor = RGBA(122, 122, 122, 0.5).CGColor;
    self.layer.borderWidth = 1.0;
    self.titleLabel.font = [UIFont systemFontOfSize:13.0];
    self.titleLabel.textAlignment = NSTextAlignmentLeft;
    self.imageView.contentMode = UIViewContentModeCenter;
}
-(void)layoutSubviews{
    [super layoutSubviews];
    if (iphone5) {
        self.titleLabel.frame = CGRectMake(0, 0, self.width-25, self.height);
    }else{
        self.titleLabel.frame = CGRectMake(5, 0, self.width-30, self.height);
    }
    self.imageView.frame = CGRectMake(self.width-25, 0, 25, self.height);
    
    
}
@end
